remove

abstract fun remove(word: String): Boolean

Removes the given word from the dictionary and schedules a write to disk.

Return

true if the given word was found and removed successfully

Parameters

word

a word to remove from the dictionary. It must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace

Throws

when word is empty or blank

when the engine is closed


abstract fun remove(words: Set<String>): List<SanitationError>

Removes the given words from the dictionary and schedules a write to disk.

Return

a list of sanitation errors if words contains words that do not exist in the dictionary, or an empty list if all words were removed successfully

Since

8.14.0

Parameters

words

a set of words to remove from the dictionary. Each word must be UTF8, between 1 and 99 bytes long, and without leading or trailing ASCII whitespace

Throws

when words is empty

when the engine is closed